AutoLISP has been enhanced with Visual LISP (VLISP), which offers an integrated development environment (IDE) that includes a compiler, debugger, and other development tools to increase productivity. VLISP adds more capabilities and extends the language to interact with objects using ActiveX. VLISP also enables AutoLISP to respond to events through object reactors.
Unlike in ObjectARX, or VBA, each document opened in the Multiple Design Environment (MDE) has its own Visual LISP namespace and environment. A namespace is an insulated environment keeping AutoLISP routines that are specific to one document from having symbol or variable name and value conflicts with those in another document. For example, the following line of code sets a different value to the symbol a for different documents.
(setq a (getvar "DWGNAME"))
Visual LISP provides
mechanisms for loading symbols and variables from one namespace
to another. More information about namespaces can be found in the AutoLISP
Developer's Guide in the Help system. To display Developer
Help, on the InfoCenter toolbar, to the right of the Help button,
click the drop-down arrow. From the menu, click Additional Resources
Developer Help.
AutoLISP applications or routines can interact with AutoCAD in many ways. These routines can prompt the user for input, access built-in AutoCAD commands directly, and modify or create objects in the drawing database. By creating AutoLISP routines you can add discipline-specific commands to AutoCAD. Some of the standard AutoCAD commands are actually AutoLISP applications.
Visual LISP provides three file format options for AutoLISP applications:
Because AutoCAD can read AutoLISP code directly, no compiling is required. While Visual LISP provides an IDE, you may choose to experiment by entering code at the command prompt, which allows you to see the results immediately. This makes AutoLISP an easy language to experiment with, regardless of your programming experience.
Even if you are not interested in writing AutoLISP applications, your AutoCAD package includes many useful routines. Routines are also available as shareware through third-party developers. Knowing how to load and use these routines can enhance your productivity.
For information about
AutoLISP programming, see the AutoLISP Developer's Guide,
and for information about AutoLISP and Visual LISP functions, see
the AutoLISP Reference in the Help
system. To display Developer Help, on the InfoCenter toolbar, to
the right of the Help button, click the drop-down arrow. From the
menu, click Additional Resources
Developer Help. AutoLISP programs can use
dialog boxes with their applications. Programmable dialog boxes
are described only in the AutoLISP Developer's Guide.